﻿import sys
import threading
import rospy
from std_msgs.msg import String

def rcv_data():
    global control_info_pub
    while True:
        lines = sys.stdin.readlines()
        data = lines
        if (data):
            control_info_pub.publish(data)
            rospy.loginfo("Publish cloud_control message %s",
                            data)

if __name__ == '__main__':
    rospy.init_node('pos_subscriber',anonymous=True)
    global control_info_pub
    control_info_pub = rospy.Publisher(
        '/control_info', String, queue_size=10)
    th=threading.Thread(target=rcv_data)
    th.start()

    
    